from celery_task.celery import app

task_id = '0d7cac23-7b29-4160-a7ec-c91352724a73'
if __name__ == '__main__':
   result = app.AsyncResult(task_id)
   if result.successful():
       print(result.get())
   elif result.failed():
       # print(result.traceback)
       print('任务执行出错')
   elif result.status == 'PENDING':
       print('任务正在等待执行...')
   elif result.status == 'STARTED':
       print('任务正在执行...')
   elif result.status == 'RETRY':
       print('任务异常，正在重试...')
   elif result.status == 'REVOKED':
       print('任务被撤销')